-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: Prevent Firefox password autofill in channel search bar #37145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Prevent Firefox password autofill in channel search bar #37145
Conversation
- Added autoComplete='off' attribute to search TextInput in SearchList component - Prevents Firefox from incorrectly suggesting saved passwords when users click the channel search bar - Matches the existing implementation in NavBarSearch component Fixes issue where Firefox confuses search bar for password field
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughAdded the autoComplete="off" attribute to the sidebar search TextInput component in SearchList.tsx to disable browser autocomplete. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/meteor/client/sidebar/search/SearchList.tsx (1)
341-350: Good fix; consider hardening with form-level autocomplete andtype='search'.Adding
autoComplete='off'on the input should stop Firefox’s password suggestions. To further reduce password manager heuristics:
- Add
autoComplete='off'to the form element too.- Set
type='search'and a stable non-credentialname.Please confirm
Sidebar.TopBar.SectionforwardsautoCompleteto the underlying<form>.Proposed diff:
- <Sidebar.TopBar.Section {...({ flexShrink: 0 } as any)} is='form'> + <Sidebar.TopBar.Section {...({ flexShrink: 0 } as any)} is='form' autoComplete='off'> <Box mb='x12' w='full'> <TextInput + type='search' + name='sidebar-search' aria-owns={listId} data-qa='sidebar-search-input' ref={autofocus} {...filter} placeholder={placeholder} role='searchbox' autoComplete='off' addon={<Icon name='cross' size='x20' onClick={onClose} />} /> </Box>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/meteor/client/sidebar/search/SearchList.tsx(1 hunks)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37145 +/- ##
===========================================
- Coverage 67.43% 64.14% -3.30%
===========================================
Files 3332 2897 -435
Lines 113607 106236 -7371
Branches 20608 18823 -1785
===========================================
- Hits 76614 68142 -8472
- Misses 34394 36184 +1790
+ Partials 2599 1910 -689
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
This PR fixes an issue where Firefox browser incorrectly shows password autofill suggestions when users click on the channel search bar in the sidebar.
Problem:
Firefox's aggressive autofill detection was misidentifying the search input field as a password field, causing it to display saved password suggestions instead of allowing users to search for channels normally.
Solution:
Added
autoComplete='off'attribute to theTextInputcomponent in the SearchList component. This explicitly tells Firefox (and other browsers) not to offer autocomplete/autofill suggestions for this field.Technical Details:
apps/meteor/client/sidebar/search/SearchList.tsx(line 348)autoComplete='off'prop to the search TextInputImpact:
Issue(s)
Fixes #37113
Steps to test or reproduce
Prerequisites:
Reproducing the bug:
Verifying the fix:
Tested:
Further comments
This is a simple, one-line fix that addresses a long-standing UX issue reported in #37113.
The solution is consistent with the existing codebase - the
NavBarSearchcomponent already usesautoComplete='off'for the same purpose (seeapps/meteor/client/NavBarV2/NavBarSearch/NavBarSearch.tsxline 84).The
autoComplete='off'attribute is a standard HTML5 attribute supported by all modern browsers and is the recommended way to disable browser autofill/autocomplete on form fields.Why this works:
Firefox uses heuristics to detect password fields and automatically suggests saved passwords. By explicitly setting
autoComplete='off', we tell the browser that this field should not use autocomplete, preventing the unwanted password suggestions.Checklist:
Summary by CodeRabbit